#ifndef __LS_LEVEL_H__
#define __LS_LEVEL_H__

/*
    1.日志等级枚举
    2.日志等级枚举转字符串
*/

namespace log_system
{
    class LogLevel
    {
    public:
        enum class value
        {
            UNKNOW = 0,
            DEBUG,
            INFO,
            WARN,
            ERROR,
            FATAL,
            OFF
        };

        static const char* toString(value v)
        {
            switch (v)
            {
            case value::DEBUG: return "DEBUG";
            case value::INFO: return "INFO";
            case value::WARN: return "WARN";
            case value::ERROR: return "ERROR";
            case value::FATAL: return "FATAL";
            case value::OFF: return "OFF";
            
            default:
                return "UNKNOW";
            }
        }

    };
}

#endif